<script>
import {mapState , mapGetters , mapMutations} from "vuex";

export default {
  name:'About',
  methods:{
    handleClick(){
      this.$store.commit('message/change', 'hi')
    },

    ...mapMutations('message',['change'])
  },
  computed:{
    ...mapState('message',['msg']),
    ...mapGetters('message',['upperMsg'])
  }
}

</script>

<template>
  <div>About.vue
    <button @click="change('hi')">mapMutations点击</button> |
    <button @click="handleClick">handleClick点击</button><br> |

    {{$store.state.message.msg}},<br> |
    {{$store.getters['message/upperMsg']}},<br> |

    {{upperMsg}}
  </div>
</template>

<style scoped>

</style>